'''
Descripttion: 管理员权限
version: python 3.6.2
Author: 刘涛
Date: 2021-04-18 20:10:22
LastEditors: 刘涛
LastEditTime: 2021-04-20 15:49:02
'''
from moments.models import Status, WeChatUser, IMG
from django.contrib import admin

# Register your models here.


# 发布的状态管理
class StatusAdmin(admin.ModelAdmin):
    list_display = ["user", "pics", "pub_time"]  # 展示用户信息
    date_hierarchy = "pub_time"  # 展示发布时间
    list_filter = ["user", "text"]
    search_fields = ["user__user__username", "text", "pics"]


admin.site.register(WeChatUser)
admin.site.register(Status, StatusAdmin)
admin.site.register(IMG)
# admin.site.register(Reply)
